<?
 session_start();
?>


<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <script type="text/javascript">
            function voltar(){
            history.back();
            }
        </script>
    </head>
    <body>
        <h1>Artigo</h1>
        <?php
        require_once($_SERVER["DOCUMENT_ROOT"] . '/Esquina_da_TI/GUI/Fachada.php');
        require_once($_SERVER["DOCUMENT_ROOT"] . '/Esquina_da_TI/ClassesBasicas/Noticia.php');
        require_once($_SERVER["DOCUMENT_ROOT"] . '/Esquina_da_TI/ClassesBasicas/Privilegio.php');
        require_once('Fachada.php');

        $artigo = null;
        $fachada = new Fachada();

        $priv = $_SESSION['privilegio'];
        $id = $_GET["codArtigo"];
   
        $fachada->carregarArtigo($id);


        if($priv == Privilegio::EDITOR){
            echo "<form>";
            echo "<table>";
            echo "</br>";
            echo "<tr><td><a href='javascript:exibirArtigosPendentes()'>Artigos Pendentes</a></td></tr>";
            echo "</br>";
            echo "<tr><td><a href='javascript:exibirVerArtigos()'>Artigos Publicados</a></td></tr>";
            echo "</table>";
            echo "</form>";
        }else{
            echo " <form>";
            echo "<table>";
            echo "<tr>";
            echo "<td><a href='javascript:exibirVerArtigos()'><font color='blue'>Voltar</font></a></td>";
            echo "</tr>";
            echo "</table>";
            echo "</form>";
        }

        ?>
    </body>
</html>


